using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Data_MeshDataType_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Data.MeshDataType);

            field = type.GetField("Coordinate", flag);
            app.RegisterCLRFieldGetter(field, get_Coordinate_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Coordinate_0, null);
            field = type.GetField("Name", flag);
            app.RegisterCLRFieldGetter(field, get_Name_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Name_1, null);
            field = type.GetField("Vertices", flag);
            app.RegisterCLRFieldGetter(field, get_Vertices_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Vertices_2, null);
            field = type.GetField("Normals", flag);
            app.RegisterCLRFieldGetter(field, get_Normals_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Normals_3, null);
            field = type.GetField("UV", flag);
            app.RegisterCLRFieldGetter(field, get_UV_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_UV_4, null);
            field = type.GetField("Triangles", flag);
            app.RegisterCLRFieldGetter(field, get_Triangles_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_Triangles_5, null);
            field = type.GetField("Child", flag);
            app.RegisterCLRFieldGetter(field, get_Child_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_Child_6, null);
            field = type.GetField("Type", flag);
            app.RegisterCLRFieldGetter(field, get_Type_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Type_7, null);
            field = type.GetField("Materials", flag);
            app.RegisterCLRFieldGetter(field, get_Materials_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_Materials_8, null);
            field = type.GetField("SubTriangles", flag);
            app.RegisterCLRFieldGetter(field, get_SubTriangles_9);
            app.RegisterCLRFieldBinding(field, CopyToStack_SubTriangles_9, null);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Data.MeshDataType());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Data.MeshDataType[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_Coordinate_0(ref object o)
        {
            return huqiang.Data.MeshDataType.Coordinate;
        }

        static StackObject* CopyToStack_Coordinate_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Coordinate;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Name_1(ref object o)
        {
            return huqiang.Data.MeshDataType.Name;
        }

        static StackObject* CopyToStack_Name_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Name;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Vertices_2(ref object o)
        {
            return huqiang.Data.MeshDataType.Vertices;
        }

        static StackObject* CopyToStack_Vertices_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Vertices;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Normals_3(ref object o)
        {
            return huqiang.Data.MeshDataType.Normals;
        }

        static StackObject* CopyToStack_Normals_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Normals;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_UV_4(ref object o)
        {
            return huqiang.Data.MeshDataType.UV;
        }

        static StackObject* CopyToStack_UV_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.UV;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Triangles_5(ref object o)
        {
            return huqiang.Data.MeshDataType.Triangles;
        }

        static StackObject* CopyToStack_Triangles_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Triangles;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Child_6(ref object o)
        {
            return huqiang.Data.MeshDataType.Child;
        }

        static StackObject* CopyToStack_Child_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Child;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Type_7(ref object o)
        {
            return huqiang.Data.MeshDataType.Type;
        }

        static StackObject* CopyToStack_Type_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Type;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_Materials_8(ref object o)
        {
            return huqiang.Data.MeshDataType.Materials;
        }

        static StackObject* CopyToStack_Materials_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.Materials;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static object get_SubTriangles_9(ref object o)
        {
            return huqiang.Data.MeshDataType.SubTriangles;
        }

        static StackObject* CopyToStack_SubTriangles_9(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Data.MeshDataType.SubTriangles;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Data.MeshDataType();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
